package com.oba.king.sysmanager.log;

import java.util.Date;

import com.oba.base.dao.BaseDao;
import com.oba.base.interfaces.IHsqlBuilder;
import com.oba.king.login.UserInfo;

public class LogDao extends BaseDao {

	public IHsqlBuilder buildByCondition(Integer type,Integer code,Date startTime,Date endTime,UserInfo userInfo) {
		IHsqlBuilder sql = getSqlBuilder("from Log log");
		sql.add("log.type = ?",type);
		sql.add("log.code = ?",code);
		sql.add("log.saveTime > ?",startTime);
		sql.add("log.saveTime < ?",endTime);
		sql.add("log.userInfo = ?",userInfo);
		sql.addend("order by log.saveTime");
		return sql;
	}
	
}
